<template>
<div class="videoList">
<VideoItem v-for="item in list" :key="item.id" :video="item"/>
</div>
</template>

<script setup lang="ts">
import VideoItem from '@/components/app_video_item.vue'
import { ref } from "@vue/reactivity";
import axios from "axios";
interface IVideoItem {
    id: number;
  imgSrc: string;
  desc: string;
  playCount: string;
  commentCount: string;
  videoSrc: string;
}

const list = ref<IVideoItem[]>([]);
axios({
  url: "/videosList",
  method: "get",
}).then((res) => {
  list.value = res.data.result;
});
</script>

<style lang="less" scoped>
.videoList{
    display: flex;
    flex-wrap: wrap;
}
</style>
